import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class test_main {
	public static void main(String[] args) {
		/* try connecting to the server */
		System.out.println("Registering Driver...");
		try {
			DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
		
		System.out.println("Driver Registered.");
		
		System.out.println("Attempting to connect...");
		Connection con = DriverManager.getConnection(
				"jdbc:oracle:thin:@localhost:1521:ug", "ora_i5l4", "a10653038");
		System.out.println("Connection Successful.");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			System.out.println("Error: Connection Unsuccessful");
			e.printStackTrace();
		}
		
		System.out.println("Done");
	}
}